<template>
  <div class="login">
    <el-card style="max-width: 400px; margin: 60px auto">
      <h2 style="text-align: center">登录 / 注册</h2>
      <el-form label-width="80px">
        <el-form-item label="用户名">
          <el-input v-model="form.username" placeholder="请输入用户名" />
        </el-form-item>
        <el-form-item label="密码">
          <el-input v-model="form.password" type="password" placeholder="请输入密码" />
        </el-form-item>
        <el-form-item label="身份">
          <el-radio-group v-model="form.role">
            <el-radio label="provider">提供需求</el-radio>
            <el-radio label="solver">解决需求</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="login">登录 / 注册</el-button>
        </el-form-item>
      </el-form>
    </el-card>
  </div>
</template>
<script setup>
import { ref } from "vue";
const form = ref({
  username: "",
  password: "",
  role: "provider",
});
function login() {
  alert("登录/注册功能待开发");
}
</script>
<style scoped>
.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6fa;
}
</style>
